﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SerialPort_Assistant.Common
{
    public class EnumUtil
    {
        public static bool Compare<T>(object val1,object val2)
        {
            T t1 = (T)Enum.Parse(typeof(T),val1.ToString());
            T t2 = (T)Enum.Parse(typeof(T),val2.ToString());

            return t1.Equals(t2);
        }
    }
}
